Imports Microsoft.VisualBasic
Imports System.Data.Common

Public Class MySqlTransaction
    Inherits DbTransaction

    Friend ReadOnly _tran As MySql.Data.MySqlClient.MySqlTransaction

    Sub New(ByVal tran As MySql.Data.MySqlClient.MySqlTransaction)

        Me._tran = tran

    End Sub

    Public Overrides Sub Commit()

        Me._tran.Commit()

    End Sub

    Protected Overrides ReadOnly Property DbConnection() As System.Data.Common.DbConnection
        Get
            Return New MySqlConnection(Me._tran.Connection)
        End Get
    End Property

    Public Overrides ReadOnly Property IsolationLevel() As System.Data.IsolationLevel
        Get
            Return Me._tran.IsolationLevel
        End Get
    End Property

    Public Overrides Sub Rollback()

        Me._tran.Rollback()

    End Sub
End Class
